﻿using GloboTicketAdmin.API.Models.Domain;
using GloboTicketAdmin.API.Models.Dto;
using Mapster;
using Microsoft.Extensions.Logging;
using NLog.Targets;

namespace GloboTicketAdmin.API.Common
{
    public static class MappingConfig
    {
        public static void Configure()
        {
            // 类别相关映射
            TypeAdapterConfig<CategoryModel, CategoryDto>.NewConfig();

            //TypeAdapterConfig<EventDto, EventModel>.NewConfig()
            //    .Ignore(dest => dest.Id);

            // 票务相关映射
            TypeAdapterConfig<EventModel, EventDto>.NewConfig()
                .Map(dest => dest.Poster, src => src.ImageUrl);

        }
    }
}
